<?php
	include '../models/Model.php';
	session_start();
	$model=new Model();
	$admin=2;
	$users=1;
	$userID=$_SESSION['userId'];
	$user=$model->searchUserById($userID);
	$userAccName=$_POST['userForm$tbFamilyName'];
	$userName=$_POST['userForm$tbFirstName'];
	$userPassword=$user->getUserPassword();
	$userKind=$user->getUserKind();
	$userTel=$_POST['userForm$tbTel'];
	$userEmail=$_POST['userForm$tbMailAddress'];
		
	$user=new User($userID,$userAccName,$userPassword,$userKind,$userName,$userTel,$userEmail);
	$model->updateUser($user);
	header("Location:../view/user/view_room.php");
?>